/**
 * 创建线程方法一：继承Thread类，重写run()方法，调用start开启线程
 */
public class TestThread01 extends Thread {
    @Override
    public void run() {
        for (int i = 0; i < 100; i++) {
            System.out.println("run方法执行"+i);
        }
    }

    public static void main(String[] args) {
        TestThread01  testThread01 = new TestThread01();
        testThread01.start();
        for (int i = 0; i < 100; i++) {
            System.out.println("主线程执行"+i);
        }
    }
}
